﻿@model SoftHotel.Models.Consumo

@{
    ViewBag.Title = "AgregarDetalles";
}

<h2>AgregarDetalles</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
    <fieldset>
        <legend> @Html.DisplayFor(model => model.servicio.nombre)</legend>
        <table>
        <tr>
		    <td style="width: 20px;"></td>
            <td style="font-weight: bold;"> Precio:</td>
		    <td>@Html.DisplayFor(model => model.detalleMoneda) @Html.DisplayFor(model => model.monto)</td>	
		    <td style="font-weight: bold;"> Cantidad:</td>
		    <td>@Html.EditorFor(model => model.cantidad)</td>	
	    </tr>
	    <tr>
		    <td style="width: 20px;"></td>
		    <td style="font-weight: bold;"> Monto Total</td>
		    <td>@Html.EditorFor(model => model.montoTotal)</td>	
            <td></td>
            <td></td>
	    </tr>
        @{
        
        int cont =0;
        if (Model.datoLlenar.Count > 0)
        {
            <tr><td style="width: 20px;"></td><td style="font-weight: bold;">DATOS DEL CONSUMO</td></tr>
        }
        
        foreach (var mm in Model.datoLlenar)
        {
            <tr><td style="width: 20px;"></td>
            <td style="font-weight: bold;">@mm.descripcion</td>
            <td>@Html.EditorFor(model=>model.datosLlenados[cont])</td>	
            <td></td>
            <td></td>
            </tr>
            cont++;
        }
        }
          </table>  
         <p>
            <input type="submit" value="Guardar" />
        </p>

    </fieldset>
}
<div>
    @Html.ActionLink("Back to List", "Index")
</div>
